package prickworlds.game;

/**
 * Base class for every {@link GameObject} that is accelerated (like rockets)
 * 
 * @author Faruk Acibal, Richard Dziambor, Christian Holzreuter, Nicolas Winkler
 * 
 */
public abstract class AcceleratingObject extends MovingSolidObject {
	/**
	 * the x-coordinate of the acceleration
	 */
	public float accX;

	/**
	 * the y-coordinate of the acceleration
	 */
	public float accY;
	
	public AcceleratingObject() {
		accX = 0.0f;
		accY = 0.0f;
	}

	/**
	 * updates position and velocity
	 */
	public void update() {
		velX += accX;
		velY += accY;

		super.update();
	}
}
